//
//  LogicControl.h
//  tcpoctest
//
//  Created by gump on 10/19/12.
//  Copyright (c) 2012 gump. All rights reserved.
//
@class LogicSB;
@class receiveFirCirNewNews;
@class receiveFirCirNewComment;
@class receiveFirCirNewLength;
@class receiveFirCirGetID;
@class receiveFirCirGetBgImage;
@class receiveFirCirGetNews;
@class receiveFirCirSendNew;
@class receiveFirCirOneNew;
@class receiveFirCirPicture;
@class receiveFirCirSendCom;
@class receiveFirCirAllComment;
@class receiveFirCirDelNewSelf;
@class receiveFirCirDelNew;

@class receiveVersion;
@class receiveVerPush;
@class receiveOnline;

@class receiveConfig;
@class receiveLoginByMail;
@class receiveLoginByPP;
@class receiveLoginOther;
@class receiveQuit;

@class receivegiftgetlist;
@class receiveGiftListLength;
@class receiveGiftListID;
@class receiveGiftInfo;
@class receiveGiftSend;
@class receiveGiftGetStorage;

@class receiveNearPeople;

@class receivePersonInfo;
@class receivePersonReadCoin;

@class receiveSystemChat;
@class receiveChat;
@class receiveChatVoice;
@class receiveChatImage;
@class receiveChatReceipt;
@class receiveChatArrive;
@class receiveChatSend;
@class receiveChatReject;

@class receiveRLRichDay;
@class receiveRLRichWeek;
@class receiveRLRichMonth;
@class receiveRLRichQuarter;
@class receiveRLRichYear;
@class receiveRLGlamourDay;
@class receiveRLGlamourWeek;
@class receiveRLGlamourMonth;
@class receiveRLGlamourQuarter;
@class receiveRLGlamourYear;

@class recevieTaskQuery;
@class receiveTaskComplete;

@class receiveCareSucess;
@class receiveFirendBeCare;

@class receiveTelepGetUser;
@class receiveTelepBeLight;
@class receiveTelepLight;
@class receiveTelepCandle;

@class receiveBigHeadImage;

@interface LogicControl : NSObject
{
    float   heatbeatcount;
    LogicSB *logicsb;
    int     gamestate;
    int     waitNearTimer;
    
    int     accessFindCarTimer;
    int     accessFindDriveTimer;
    int     accessDriveTimer;
    
    receiveFirCirNewNews        *receiveFCNewNews;
    receiveFirCirNewComment     *receiveFCNewComment;
    receiveFirCirNewLength      *receiveFCNewLength;
    receiveFirCirGetID          *receiveFCGetID;
    receiveFirCirGetBgImage     *receiveFCBgImage;
    receiveFirCirGetNews        *receiveFCGetNews;
    receiveFirCirSendNew        *receiveFCSendNew;
    receiveFirCirOneNew         *receiveFCOneNew;
    receiveFirCirPicture        *receiveFCPic;
    receiveFirCirSendCom        *receiveFCSendCom;
    receiveFirCirAllComment     *receiveFCAC;
    receiveFirCirDelNewSelf     *receiveFCDelNewSelf;
    receiveFirCirDelNew         *receiveFCDelNew;
    
    receiveVersion              *receiveVer;
    receiveVerPush              *receiveVP;
    receiveOnline               *receiveOL;
    
    receiveConfig               *receivec;
    receiveLoginByMail          *receiveloginmail;
    receiveLoginByPP            *receiveloginpp;
    receiveLoginOther           *receivelother;
    receiveQuit                 *receiveq;
    
    receivegiftgetlist          *receivegiftGetL;
    receiveGiftListLength       *receivegiftLL;
    receiveGiftListID           *receivegiftLID;
    receiveGiftInfo             *receiveGiftI;
    receiveGiftSend             *receivegiftS;
    receiveGiftGetStorage       *receivegiftStorage;
    
    receiveNearPeople           *receiveNP;
    
    receivePersonInfo           *receivePInfo;
    receivePersonReadCoin       *receivePRC;
    
    receiveSystemChat           *receiveSC;
    receiveChat                 *receiveChatText;
    receiveChatVoice            *receiveChatV;
    receiveChatImage            *receiveChatI;
    receiveChatReceipt          *receiveChatR;
    receiveChatArrive           *receiveChatA;
    receiveChatSend             *receiveChatRead;
    receiveChatReject           *receiveChatRej;
    
    receiveRLRichDay            *receiveRLRDay;
    receiveRLRichWeek           *receiveRLRWeek;
    receiveRLRichMonth          *receiveRLRMonth;
    receiveRLRichQuarter        *receiveRLRQuarter;
    receiveRLRichYear           *receiveRLRYear;
    receiveRLGlamourDay         *receiveRLGDay;
    receiveRLGlamourWeek        *receiveRLGWeek;
    receiveRLGlamourMonth       *receiveRLGMonth;
    receiveRLGlamourQuarter     *receiveRLGQuarter;
    receiveRLGlamourYear        *receiveRLGYear;
    
    recevieTaskQuery            *receiveTaskQ;
    receiveTaskComplete         *receiveTaskC;
    
    receiveCareSucess           *receiveFirendCare;
    receiveFirendBeCare         *receiveFirendBC;
    
    receiveTelepGetUser         *receiveTelepGU;
    receiveTelepLight           *receiveTelepL;
    receiveTelepBeLight         *receiveTelepBL;
    receiveTelepCandle          *receiveTelepC;
    
    receiveBigHeadImage         *receiveBigHI;
}

@property(strong,nonatomic) NSTimer *timer;
@property                   int     icurSequence;

+(LogicControl*)sharedLogicControl;
-(void)analysePacket:(PACKET *)p;
-(void)beginRecv;

-(void)processAddFirend:(int)index;
-(void)processSetPerson:(int)index;
-(void)processChat:(int)index;
-(void)processHeadImage;

-(void)changeState:(int)state;
-(void)gameLogic;

-(void)backToForeground;

-(void)processSearchFirend:(FirendInfo *)fi;

-(void)processFirendCircle:(int)index;

-(void)ChangeDevice;

-(void)processGift:(int)index;

-(int)CurSequence;

-(void)processRankList:(int)iindex;

-(void)processTask:(int)iindex;

-(void)processTelepathy:(int)iindex;

@end
